package leetcode.interview;

public class Test1704 {
    public int missingNumber(int[] nums) {
        int sumN=(nums.length*(nums.length+1))/2;
        int sumArr=0;
        for(int a:nums){
            sumArr+=a;
        }
        return sumN-sumArr;
    }
}
